<template>
  <view class="containter">
    <img class="img" :src="pcInfo.image" alt="">
    <img class="startIcon cursor" @click="toHome" :src="pcInfo.welcome_image" alt="">
  </view>
</template>

<script>
  import reqApi from "../../api/api.js";
  export default {
    data() {
      return {
        pcInfo: {
          welcome_image: "/static/images/startIcon.png"
        }
      }
    },
    onLoad() {
      this.getData();
    },
    methods: {
      getData() {
        reqApi.basicData({}).then(res => {
          this.pcInfo = res.data['h5'];
        })
      },
      toHome(){
        uni.navigateTo({
          url: `/pages/home/changeLang?src=${this.pcInfo.welcome_image}`
        })
      }
    }
  }
</script>

<style lang="scss" scoped>
  .containter {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #00508C;
    .img {
      width: 100vw;
      height: 100vh;
      object-fit: scale-down;
    }

    .startIcon {
      width: 150rpx;
      height: 150rpx;
      position: absolute;
      z-index: 100;
      bottom: 150rpx;
      left: 50%;
      transform: translatex(-50%);
    }
  }
</style>